<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	<div id="app">
		<anchored-heading :level="2">
			<a name="hello-world" href="#hello-world">
   		    相顾无相识，长歌怀采薇。
			</a>
		</anchored-heading>
	</div>
	<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	<script>
		const app = Vue.createApp({})
        app.component('anchored-heading', {
            render() {
                const { h } = Vue
                return h(
                    'h' + this.level, // tag name
                    {}, // props/attributes
                    this.$slots.default() // array of children
                )
            },
             props: {
                level: {
                    type: Number,
                    required: true
                },
			}
        })
            app.mount('#app')
		</script>
	</body>
</html>